package com.anhry.www.safety.manage.oa.struts.base;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.anhry.www.safety.manage.enterprise.service.EnterpriseService;
import com.anhry.www.safety.manage.oa.service.CallService;
import com.anhry.www.safety.manage.oa.service.NoticeService;
import com.anhry.www.safety.manage.system.service.SystemService;
import com.anhry.www.safety.util.Page;
import com.anhry.www.safety.util.action.UtilBaseAction;

/**
 * 
 * @author chen
 * @date 2012-9-10
 */
@Controller
public class OABaseAction extends UtilBaseAction{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Resource
	protected SystemService systemService;
	
	@Resource
	protected NoticeService noticeService;
	
	@Resource
	protected EnterpriseService enterprisService;
	
	@Resource
	protected CallService callService;
	
	protected Page page;
	protected String num;
	protected String size;
	protected String tip;

	protected String result;
	
	protected int pageNo = 1;
	protected int rowCount = 0;
	protected int pageSize = 10;//定义分页的每页显示的初始个数
	
	/**
	 * 设置从页面传过来的分页参数
	 */
	protected void setPagingParameters() {
		if(num != null && !"".equals(num)) {
			pageNo = Integer.parseInt(num);
		}
		if(size != null && !"".equals(size)){
			pageSize = Integer.parseInt(size);
		}
		
		page = new Page(pageSize, pageNo, rowCount);
	}
	
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}


	public String getNum() {
		return num;
	}

	public void setNum(String num) {
		this.num = num;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public String getSize() {
		return size;
	}

	public void setSize(String size) {
		this.size = size;
	}

	public String getTip() {
		return tip;
	}

	public void setTip(String tip) {
		this.tip = tip;
	}

	public int getPageNo() {
		return pageNo;
	}

	public void setPageNo(int pageNo) {
		this.pageNo = pageNo;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getRowCount() {
		return rowCount;
	}

	public void setRowCount(int rowCount) {
		this.rowCount = rowCount;
	}

}
